package com.ruoyi.service.impl;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.AdvMembersmsgMapper;
import com.ruoyi.domain.AdvMembersmsg;
import com.ruoyi.service.IAdvMembersmsgService;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2024-06-04
 */
@Service
public class AdvMembersmsgServiceImpl implements IAdvMembersmsgService
{
    @Autowired
    private AdvMembersmsgMapper advMembersmsgMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param advMembersmsg 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public AdvMembersmsg selectAdvMembersmsgByAdvMembersmsg(Long advMembersmsg)
    {
        return advMembersmsgMapper.selectAdvMembersmsgByAdvMembersmsg(advMembersmsg);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param advMembersmsg 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<AdvMembersmsg> selectAdvMembersmsgList(AdvMembersmsg advMembersmsg)
    {
        return advMembersmsgMapper.selectAdvMembersmsgList(advMembersmsg);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param advMembersmsg 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertAdvMembersmsg(AdvMembersmsg advMembersmsg)
    {
        Date date = new Date();
        String time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
        advMembersmsg.setMsgdate(time);
        return advMembersmsgMapper.insertAdvMembersmsg(advMembersmsg);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param advMembersmsg 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateAdvMembersmsg(AdvMembersmsg advMembersmsg)
    {
        return advMembersmsgMapper.updateAdvMembersmsg(advMembersmsg);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param advMembersmsgs 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAdvMembersmsgByAdvMembersmsgs(Long[] advMembersmsgs)
    {
        return advMembersmsgMapper.deleteAdvMembersmsgByAdvMembersmsgs(advMembersmsgs);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param advMembersmsg 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAdvMembersmsgByAdvMembersmsg(Long advMembersmsg)
    {
        return advMembersmsgMapper.deleteAdvMembersmsgByAdvMembersmsg(advMembersmsg);
    }
}
